package com.biz.primus.ms.adv.dao.repository;

import com.biz.primus.ms.adv.dao.po.AdPosition;
import com.biz.primus.ms.base.jpa.repository.CommonJpaRepository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;

/**
 * 广告位信息repository
 *
 * @author jun.liu
 * @usage
 * @reviewer
 * @since 2017-09-18
 */
public interface AdPositionRepository extends CommonJpaRepository<AdPosition, Long> { //, AdPositionDao {

    @Query("select ad from AdPosition ad order by ad.createTimestamp desc")
    Page<AdPosition> findAll(Pageable page);
}
